Carlos Garnacho [Tue, 9 Nov 2010 17:28:38 +0000 (18:28 +0100)]
GtkWidget: Ensure the style context always has an screen.
Things like font settings depend on the screen, and widgets
like GtkTextView trigger queries on widgets without screen
when the parent window is being destroyed.
Carlos Garnacho [Tue, 9 Nov 2010 17:27:36 +0000 (18:27 +0100)]
Add CSS class defines for toolbars and docks.
Carlos Garnacho [Tue, 9 Nov 2010 17:27:13 +0000 (18:27 +0100)]
GtkStyle: translate a few more detail strings.
Carlos Garnacho [Tue, 9 Nov 2010 17:26:39 +0000 (18:26 +0100)]
GtkCssProvider: theme progressbars in default CSS.
Carlos Garnacho [Mon, 8 Nov 2010 19:17:17 +0000 (20:17 +0100)]
GtkThemingEngine: ensure 1px wide frames aren't painted between pixels.
Carlos Garnacho [Mon, 8 Nov 2010 19:15:19 +0000 (20:15 +0100)]
GtkThemingEngine: Use square cap for solid frames.
Carlos Garnacho [Mon, 8 Nov 2010 19:12:15 +0000 (20:12 +0100)]
GtkThemingEngine: ensure that background isn't rendered past the frame boundaries.
Carlos Garnacho [Mon, 8 Nov 2010 11:48:29 +0000 (12:48 +0100)]
GtkThemingEngine: Get rid of obsolete code for tooltips.
Carlos Garnacho [Mon, 8 Nov 2010 11:39:28 +0000 (12:39 +0100)]
GtkStyleContext: Fix check for GtkIconSize in render_icon_pixbuf().
Carlos Garnacho [Mon, 8 Nov 2010 01:53:12 +0000 (02:53 +0100)]
GtkStyleContext: restore widget state too in restore().
Carlos Garnacho [Mon, 8 Nov 2010 01:51:53 +0000 (02:51 +0100)]
GtkCssProvider: Do not miss the last class name in concatenated classes.
Selectors like .menu.check or .entry.progressbar were being misparsed
and attributed to .menu and .entry.
Carlos Garnacho [Mon, 8 Nov 2010 01:30:39 +0000 (02:30 +0100)]
GtkStyle: transform window background detail string.
Carlos Garnacho [Mon, 8 Nov 2010 01:15:06 +0000 (02:15 +0100)]
GtkStyle: Transform menubar detail string.
Carlos Garnacho [Mon, 8 Nov 2010 00:52:25 +0000 (01:52 +0100)]
GtkStyle: Transform menu accelerators string
Carlos Garnacho [Mon, 8 Nov 2010 00:30:02 +0000 (01:30 +0100)]
GtkStyleContext: Define some more class names.
Carlos Garnacho [Sat, 6 Nov 2010 11:40:15 +0000 (12:40 +0100)]
Remove GTK_REGION_DEFAULT
GTK_STYLE_CLASS_DEFAULT is preferred to match a default area, as
it doesn't make sense to have a per-region default.
Carlos Garnacho [Sat, 6 Nov 2010 11:38:52 +0000 (12:38 +0100)]
GtkThemingEngine: Use GtkSymbolicColor for shades.
Carlos Garnacho [Sat, 6 Nov 2010 11:37:46 +0000 (12:37 +0100)]
GtkThemingEngine: Do not require a default value when registering properties
NULL should work for 0 for int/double/enum/... types and NULL for
pointer types, this should be sane enough to not require a default
value.
Carlos Garnacho [Sat, 6 Nov 2010 11:36:05 +0000 (12:36 +0100)]
GtkSymbolicColor: Only require styleproperties when resolving named colors.
It is not necessary for resolving colors based on literals,
so be a bit less strict here.
Carlos Garnacho [Sat, 6 Nov 2010 11:35:20 +0000 (12:35 +0100)]
GtkSymbolicColor: convert to/from hls when shading.
This makes shading equal to GtkStyle's.
Carlos Garnacho [Sat, 6 Nov 2010 11:33:52 +0000 (12:33 +0100)]
GtkSymbolicColor: Do not clamp shade/mix/alpha factors.
Carlos Garnacho [Wed, 3 Nov 2010 20:14:08 +0000 (21:14 +0100)]
GtkStyleContext: Add gtk_render_icon_pixbuf()
This function is similar to gtk_style_render_icon(), which is now
implemented on top of this one.
Carlos Garnacho [Wed, 3 Nov 2010 20:12:57 +0000 (21:12 +0100)]
GtkThemingEngine: Fix compile warning.
Carlos Garnacho [Wed, 3 Nov 2010 20:10:06 +0000 (21:10 +0100)]
Fix compile warning
Carlos Garnacho [Wed, 3 Nov 2010 18:27:18 +0000 (19:27 +0100)]
GtkStatusIcon: update to use gtk_widget_override_symbolic_color().
Carlos Garnacho [Wed, 3 Nov 2010 11:21:04 +0000 (12:21 +0100)]
GtkWidget: Add new set of methods to override style information.
gtk_widget_override_*() deprecates gtk_widget_modify_*(). There are
only functions to modify fg/bg/font/symbolic color, If anything more
fancy/complex is needed. There is the possibility of adding a
GtkStyleProvider yourself.
Carlos Garnacho [Wed, 3 Nov 2010 11:18:48 +0000 (12:18 +0100)]
GtkStyle: Listen to context changes.
This way the GtkStyle is updated to the latest style info, actually
emitting ::style-set must be performed after invalidating the style
context.
Carlos Garnacho [Wed, 3 Nov 2010 11:17:06 +0000 (12:17 +0100)]
GtkStyleContext: Add the start of a default set of class names/regions.
Carlos Garnacho [Wed, 3 Nov 2010 11:15:49 +0000 (12:15 +0100)]
Theming documentation fixes
2 functions were not in -sections.txt, and GtkStyleSet was renamed
to GtkStyleProperties.
Carlos Garnacho [Wed, 3 Nov 2010 10:40:12 +0000 (11:40 +0100)]
GtkStyleContext: Fix merging of local and global providers.
Carlos Garnacho [Wed, 3 Nov 2010 10:36:18 +0000 (11:36 +0100)]
GtkStyleProperties: Merge font descriptions on merge()
This is necessary so incomplete font descriptions are ensured to have
family and size.
Carlos Garnacho [Wed, 3 Nov 2010 10:35:42 +0000 (11:35 +0100)]
GtkSymbolicColor: Take const GdkRGBA in new_literal().
Carlos Garnacho [Mon, 1 Nov 2010 02:58:21 +0000 (03:58 +0100)]
Document gtk_render_* functions.
Carlos Garnacho [Mon, 1 Nov 2010 01:46:35 +0000 (02:46 +0100)]
Add gtk_render_activity()
This method will render progress bars and spinners, these should
handle active and inconsistent states' animation progress in order
to perform animations.
Carlos Garnacho [Mon, 1 Nov 2010 01:42:08 +0000 (02:42 +0100)]
GtkThemingEngine: draw resize grip through render_handle().
GtkJunctionSides is used instead of GdkWindowEdge, GtkStyle
implementation has changed to use GtkStyleContext's.
Carlos Garnacho [Mon, 1 Nov 2010 01:37:07 +0000 (02:37 +0100)]
GtkWidget: Trigger state change transitions on state flags change.
This makes state transitions automatic for non-complex widgets, complex
widgets such as GtkTreeView still need to notify state updates themselves.
Carlos Garnacho [Sun, 31 Oct 2010 13:45:41 +0000 (14:45 +0100)]
GtkToolItemGroup: Set widget state as state flags.
Carlos Garnacho [Sun, 31 Oct 2010 13:45:19 +0000 (14:45 +0100)]
GtkToggleButton: Set widget state as state flags.
Carlos Garnacho [Sun, 31 Oct 2010 13:45:01 +0000 (14:45 +0100)]
GtkRadioButton: Set widget state as state flags.
Carlos Garnacho [Sun, 31 Oct 2010 13:44:26 +0000 (14:44 +0100)]
GtkNotebook: Set widget state as state flags.
Carlos Garnacho [Sun, 31 Oct 2010 13:44:09 +0000 (14:44 +0100)]
GtkMenuItem: Set widget state as state flags.
Carlos Garnacho [Sun, 31 Oct 2010 13:43:55 +0000 (14:43 +0100)]
GtkMenu: Set widget state as state flags.
Carlos Garnacho [Sun, 31 Oct 2010 13:43:37 +0000 (14:43 +0100)]
GtkExpander: Set widget state as state flags.
Carlos Garnacho [Sun, 31 Oct 2010 13:43:20 +0000 (14:43 +0100)]
GtkEntry: Set widget state as state flags.
Carlos Garnacho [Sun, 31 Oct 2010 13:42:51 +0000 (14:42 +0100)]
GtkComboBox: Set widget state as state flags.
Carlos Garnacho [Sun, 31 Oct 2010 13:38:26 +0000 (14:38 +0100)]
GtkButton: Set widget state as state flags.
Carlos Garnacho [Sat, 30 Oct 2010 19:48:38 +0000 (21:48 +0200)]
Implement widget states as a set of flags
gtk_widget_(set|unset|get)_state_flags() has been added, using GtkStateFlags
to represent the widget state. GtkStateType API has been implemented on top
of the new one.
Carlos Garnacho [Sat, 30 Oct 2010 17:53:43 +0000 (19:53 +0200)]
Document missing value in GtkStateFlags
Carlos Garnacho [Fri, 29 Oct 2010 04:47:32 +0000 (06:47 +0200)]
s/GtkStyleSet/GtkStyleProperties/
The former name had oddities such as gtk_style_set_set() and such,
so the new name is nicer in that regard and not much longer.
Carlos Garnacho [Fri, 29 Oct 2010 04:01:51 +0000 (06:01 +0200)]
GtkWidget: Ensure name changes involve a style context update.
Carlos Garnacho [Fri, 29 Oct 2010 03:33:38 +0000 (05:33 +0200)]
Rely only on fg/bg colors.
"foreground-color" has been renamed to just "color" as in regular CSS,
and the "text-color" and "base-color" properties have been removed. The
default CSS has been changed to have widgets cope with this change.
Carlos Garnacho [Fri, 29 Oct 2010 03:30:36 +0000 (05:30 +0200)]
GtkCssProvider: Fix parsing of concatenated classes.
Now selectors such as:
GtkWidget#name.class1.class2
#name.class1.class2
.class1.class2
are parsed correctly, being meaningful for a widget defining several
classes.
Carlos Garnacho [Wed, 27 Oct 2010 21:23:14 +0000 (23:23 +0200)]
GtkThemingEngine: Use ::name when registering style props.
Carlos Garnacho [Mon, 25 Oct 2010 22:43:20 +0000 (00:43 +0200)]
GtkThemingEngine: Add ::name construct only property
This property is to be set by theming engines, the name set will be favored
over the object type name when registering custom properties, making possible
something like:
-Clearlooks-border: blah;
Carlos Garnacho [Mon, 25 Oct 2010 22:16:22 +0000 (00:16 +0200)]
GtkStyleSet: Prevent from possible underflow.
Carlos Garnacho [Mon, 25 Oct 2010 18:44:15 +0000 (20:44 +0200)]
GtkCssProvider: Parse alpha() symbolic colors.
The "alpha" symbolic color modifies a passed color's alpha by a factor,
the syntax would accept things like:
background-color: alpha (@bg_color, 0.8);
foreground-color: alpha (shade (@fg_color, 0.8), 0.5);
Carlos Garnacho [Mon, 25 Oct 2010 18:41:36 +0000 (20:41 +0200)]
GtkSymbolicColor: Add gtk_symbolic_color_new_alpha()
This function modifies the alpha channel of a color, multiplying
it by a factor.
Carlos Garnacho [Mon, 25 Oct 2010 11:55:56 +0000 (13:55 +0200)]
GtkCssProvider: Make default style depend more on custom colors.
Carlos Garnacho [Mon, 25 Oct 2010 11:55:18 +0000 (13:55 +0200)]
GtkStyle: Get to style GtkCellRendererText text.
Carlos Garnacho [Mon, 25 Oct 2010 08:24:15 +0000 (10:24 +0200)]
GtkThemingEngine: render 0-radius frames with 3D-like 45° corner effect
Carlos Garnacho [Sat, 23 Oct 2010 22:04:34 +0000 (00:04 +0200)]
GtkThemingEngine: Clear the background for .background class
Carlos Garnacho [Sat, 23 Oct 2010 20:51:58 +0000 (22:51 +0200)]
GtkStyle: translate active state in paint_flat_box().
Carlos Garnacho [Sat, 23 Oct 2010 20:24:57 +0000 (22:24 +0200)]
GtkCssProvider: Update end string when misparsing symbolic colors.
Carlos Garnacho [Sat, 23 Oct 2010 19:40:49 +0000 (21:40 +0200)]
GtkCssProvider: Allow '\t' when parsing values.
Carlos Garnacho [Sat, 23 Oct 2010 19:40:20 +0000 (21:40 +0200)]
GtkSymbolicColor: Initialize alpha when resolving shades.
Carlos Garnacho [Sat, 23 Oct 2010 16:33:07 +0000 (18:33 +0200)]
GtkThemingEngine: Improve rendering of inset/outset borders.
Carlos Garnacho [Sat, 23 Oct 2010 16:32:15 +0000 (18:32 +0200)]
GtkCssProvider: Improve default CSS.
Carlos Garnacho [Sat, 23 Oct 2010 16:25:18 +0000 (18:25 +0200)]
GtkStyle: Handle scrollbar buttons.
Carlos Garnacho [Sat, 23 Oct 2010 16:24:14 +0000 (18:24 +0200)]
Do not shade alpha values.
Carlos Garnacho [Fri, 22 Oct 2010 21:59:58 +0000 (23:59 +0200)]
GtkStyle: Match "trough" and "slider" detail strings.
This is so scrollbars can be themed throught the "trough" and
"slider" classes.
Carlos Garnacho [Fri, 22 Oct 2010 10:41:19 +0000 (12:41 +0200)]
Use GdkRGBA all around in GtkStyleContext.
Carlos Garnacho [Fri, 22 Oct 2010 08:38:21 +0000 (10:38 +0200)]
GtkStyleSet: Register the border-style and border-color properties
This is also implemented in the theming engine, although the default
CSS should be using it in order to theme buttons, troughs, sliders
and such.
Carlos Garnacho [Wed, 20 Oct 2010 17:52:50 +0000 (19:52 +0200)]
GtkStyleContext: '_' prefix the structs, gtk-doc prefers this.
Carlos Garnacho [Wed, 20 Oct 2010 17:33:39 +0000 (19:33 +0200)]
GtkWidgetPath: turn into a boxed type.
Carlos Garnacho [Wed, 20 Oct 2010 17:02:41 +0000 (19:02 +0200)]
GtkStyleContext: s/set/add/ and s/unset/remove/ for classes/regions.
Several classes and regions may be set to GtkStyleContext, so rename
the functions to be more intuitive.
Carlos Garnacho [Wed, 20 Oct 2010 16:47:28 +0000 (18:47 +0200)]
GtkThemingEngine: Honor border-radius in render_background().
Carlos Garnacho [Wed, 20 Oct 2010 16:44:48 +0000 (18:44 +0200)]
GtkStyleSet: Register the "border-radius" property
Carlos Garnacho [Wed, 20 Oct 2010 16:05:15 +0000 (18:05 +0200)]
GtkStyleContext: Update function declaration in header.
Carlos Garnacho [Wed, 20 Oct 2010 16:04:39 +0000 (18:04 +0200)]
GtkCssProvider: Make it able to parse enums.
Carlos Garnacho [Wed, 20 Oct 2010 15:37:00 +0000 (17:37 +0200)]
GtkCssProvider: Run through the widget path in the correct order.
Comparing a selector with a widget path was being done backwards since
the change to use GtkContainer::get_path_for_child().
Matthias Clasen [Wed, 20 Oct 2010 11:26:27 +0000 (13:26 +0200)]
Make loading of theming engines from modules work
Carlos Garnacho [Tue, 19 Oct 2010 16:42:00 +0000 (18:42 +0200)]
GtkStyleContext: Add gtk_style_context_new().
Carlos Garnacho [Tue, 19 Oct 2010 11:00:07 +0000 (13:00 +0200)]
GtkCssProvider: Parse default/sorted region flags.
Carlos Garnacho [Tue, 19 Oct 2010 10:59:19 +0000 (12:59 +0200)]
GtkCssProvider: Parse missing widget states.
Carlos Garnacho [Tue, 19 Oct 2010 10:09:23 +0000 (12:09 +0200)]
Change semantics of the methods to check whether an animation is running.
It actually messed up with the state being actually set, and having a
transition animation running for it. Now this dichotomy is removed, and
gtk_style_context_state_is_running() only checks whether an animation is
running, leaving state checking to flags & GTK_STATE_FLAG_*.
Carlos Garnacho [Tue, 19 Oct 2010 09:29:18 +0000 (11:29 +0200)]
GtkStyleContext: Actually store region ID when starting an animation.
Carlos Garnacho [Tue, 19 Oct 2010 08:59:46 +0000 (10:59 +0200)]
Add theming docs
Both API and file format is documented, there's still missing
a migration doc though.
Carlos Garnacho [Tue, 12 Oct 2010 22:52:50 +0000 (00:52 +0200)]
Remove GtkOrientation parameter from gtk_render_handle().
The case for paned can be guessed out from the height and width,
for handlebox the orientation parameter doesn't make much sense,
and this way it could also be used for resize grips.
Benjamin Berg [Wed, 13 Oct 2010 14:33:38 +0000 (16:33 +0200)]
Use cairo gobject support instead of a new boxed type.
Carlos Garnacho [Tue, 12 Oct 2010 19:48:23 +0000 (21:48 +0200)]
GtkGradient: Handle symbolic gradients.
The css parser has been modified to parse correctly radial gradients:
background-image: -gtk-gradient (radial,
center center, 0,
center center, 0.8,
from (#000), to (#fff));
The theming engine has been modified to correctly animate these,
as well as transitions between different pattern types.
Carlos Garnacho [Tue, 12 Oct 2010 01:46:40 +0000 (03:46 +0200)]
Gtk9Slice: Fix stretch case.
Carlos Garnacho [Mon, 11 Oct 2010 17:27:36 +0000 (19:27 +0200)]
GtkWidget: Store GtkStyleContext in private struct.
Carlos Garnacho [Mon, 11 Oct 2010 15:58:31 +0000 (17:58 +0200)]
GtkStyleContext: Cache style properties accross class/region changes.
Carlos Garnacho [Sun, 10 Oct 2010 22:23:40 +0000 (00:23 +0200)]
GtkContainer: Add method to get the GtkWidgetPath for a child.
This is now used throughout in order to have the full path for a given widget,
including intermediate named regions, the default implementation just returns
the GtkContainer's path copy, no intermediate regions between.
Carlos Garnacho [Sat, 9 Oct 2010 13:19:52 +0000 (15:19 +0200)]
GtkStyleContext: Fix animation framework to work with the new draw() semantics.
Invalidation region coalescing now happens recursively as draw() runs, and the
widget's x/y as now drawing coordinates are 0,0 based.
Carlos Garnacho [Fri, 8 Oct 2010 16:36:46 +0000 (18:36 +0200)]
GtkCssProvider: Add support for @import rules
Now other CSS files can be referenced from the currently parsed file:
@import url (other-file.css);
@import url (/some/file.css);
Carlos Garnacho [Fri, 8 Oct 2010 16:32:10 +0000 (18:32 +0200)]
GtkCssProvider: no need for resetting the parser prior to parsing data
This is done anyway on each iteration to parse_rule() in parse_stylesheet()
Carlos Garnacho [Fri, 8 Oct 2010 16:27:22 +0000 (18:27 +0200)]
GtkCssProvider: improve file paths parser.
It will now return a full path, and check about the file being sane.
Carlos Garnacho [Fri, 8 Oct 2010 16:19:34 +0000 (18:19 +0200)]
GtkCssProvider: Transform custom colors to a @define-color rule.
Given there are other rules such as @import (which will be supported),
keep a sane namespace here, so for (re)defining a color name, in the CSS
file it will look like:
@define-color color-name #fff;
@define-color other-color mix (@color-name, #f00, 0.4);
Carlos Garnacho [Fri, 8 Oct 2010 16:13:14 +0000 (18:13 +0200)]
GtkThemingEngine: Do not return a const GtkThemingEngine on load()